package com.yoj.serviceclient.service.judge;

import com.yoj.serviceclient.service.judge.fallback.JudgeFeignClientFallback;
import com.yoj.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 判题服务接口定义
 */
@FeignClient(name = "yoj-judge-service", path = "/api/judge/inner", fallback = JudgeFeignClientFallback.class)
public interface JudgeFeignClient {

    /**
     * 判题
     * @param questionSubmitId 题目提交 id
     * @return 题目提交信息
     */
    @PostMapping("/do")
    QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId);
}